﻿using System;
using System.Collections;
using System.IO;

namespace Bing_Wallpaper_Downloader
{
    internal class SortFiles : IComparer
    {
        int IComparer.Compare(Object object1, Object object2)
        {
            DateTime dateTime1 = File.GetLastWriteTime(object1.ToString());
            DateTime dateTime2 = File.GetLastWriteTime(object2.ToString());

            return DateTime.Compare(dateTime1, dateTime2);
        }
    }
}